package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.CommentSpeak;
import cn.wolfcode.trip.base.mapper.CommentSpeakMapper;
import cn.wolfcode.trip.base.service.ICommentSpeakService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentSpeakService implements ICommentSpeakService {
    @Autowired
    CommentSpeakMapper commentSpeakMapper;

    public void save(CommentSpeak commentSpeak) {
        commentSpeakMapper.insert(commentSpeak);
    }

    public CommentSpeak getById(Long id) {
        return commentSpeakMapper.selectByPrimaryKey(id);
    }

    public List<CommentSpeak> listAll() {
        return  commentSpeakMapper.selectAll();
    }
}
